package xinyou.jh.net.login
{
	import xinyou.jh.net.JHStruct;
	
	
	
	public class LoginStruct extends JHStruct
	{
		public function LoginStruct()
		{
			super();
		}
		
		override protected function initReceiverHash():void
		{
			addReceiverHash([10,1],CL_AUTH_S2C_READY);//客户端接收命令和结构体
			addReceiverHash([10,3],CL_AUTH_S2C_ANS_VERIFY);//客户端接收命令和结构体
			addReceiverHash([10,5],CL_AUTH_S2C_ANS_AUTH);//客户端接收命令和结构体
			addReceiverHash([10,9],CL_AUTH_S2C_ANS_SVRSELECT);//客户端接收命令和结构体
			addReceiverHash([10,11],CL_AUTH_S2C_KICKUSER);//客户端接收命令和结构体
		}
		
		override protected function initSenderHash():void
		{
			addSenderHash([10,2],CL_AUTH_C2S_ASK_VERIFY);//客户端发送命令和结构体
			addSenderHash([10,4],CL_AUTH_C2S_ASK_AUTH);//客户端发送命令和结构体
		}
		
		public var CL_AUTH_S2C_READY:XML =
			<struct>
				DWORD       dwEncKey;
			</struct>;
		
		public var CL_AUTH_S2C_ANS_VERIFY:XML =
			<struct>
				BYTE		byResult;
			</struct>;
		
		public var CL_AUTH_C2S_ASK_VERIFY:XML =
			<struct>
				BYTE		byHighVersion;
				BYTE		byMiddleVersion;
				BYTE		byLowVersion;
				char		szLocalIP[16];
			</struct>;
		
		
		public var CL_AUTH_C2S_ASK_AUTH:XML =
			<struct>
				DWORD     	dwAuthUserID;//验证服务器ID号
				char		szID[20];//帐号
				char		szPasswd[24];//密码
			</struct>;	
		
		public var CL_AUTH_S2C_ANS_AUTH:XML =
			<struct>
				short		nErrorCode;//结果,OK(0),其他到参见KICKUSER消息
			</struct>;
		
		public var CL_AUTH_S2C_ANS_SVRSELECT:XML =
			<struct>
				DWORD		dwAuthUserID;//分配的ID，必须使用这个ID才能登陆到AgentServer
				CHAR		szSerialKey[32];//分配的认证KEY，必须使用这个KEY才能登陆到AgentServer 
				CHAR		szSvrIP[16];//游戏服务器IP
				DWORD		dwSvrPort;//游戏服务器端口
				BYTE		byResult;//保留
			</struct>;
		
		public var CL_AUTH_S2C_KICKUSER:XML =
			<struct>
				UINT16				nErrorCode;
				char				szErrorDesc[64];
			</struct>;
	}
}